/***************************************************************************
 *   Copyright (C) 2009 by Bernhard Neuhofer   *
 *   mail@bneu.at   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef MYCORBA_H
#define MYCORBA_H

#include  "../AS/corbaAddressServer.h"
#include "log.h"

class mycorba
{
public:
    static mycorba& instance()
    {
        static mycorba _instance;
        return _instance;
    }

    ~mycorba();
    PortableServer::POA_var getPOA() {
        return _poa;
    }
    CORBA::Object_var getObj() {
        return _obj;
    }
    CORBA::ORB_var getORB() {
        return _orb;
    }
    void init(int argc, char** args);
    void run() {
        _orb->run();
    }

private:
    mycorba();
    mycorba( const mycorba&);
    mycorba& operator = (const mycorba &);
    PortableServer::POA_var _poa;
    CORBA::ORB_var _orb;
    CORBA::Object_var _obj;
    bool _init;
};


#endif